<style type='text/css'>
th,td {
	text-align:left
}
.page-header{padding-bottom:0;margin:0}
.fui-cellone{padding:0}
.c{text-align:center}
.ibox-content{padding:0}
</style>
<div class="form-group-title" style="height:40px;">
   <span style="float:left;">当日收入经营概况</span>
   	<a style="float:right;margin-right:20px;color:red;" href="javascript:;" ng-click="post(pagedata.post,'/manage.posgoods/print5/');">打印汇总小票</a>
</div>
<div class="col-jy" style="width:100%">
    <div class="col-jy-6" style='border-right: 1px solid #ddd;padding-right:20px'>
        <div class="panel" style="background:#f2f2f2">
              <div class="panel-body">
                   <div class="panel-title">
                        <span class="label label-black pull-right" style="background-color:#666;color:#fff">实时</span>
                        <h4>当日订单总金额</h4>
                   </div>
                   <div class="panel-content">
						 <div class="row">
							 <div class="col-md-10">
								 <h1 class="syscolor">
									{{pagedata.data.dayfee || '0.00'}}元
								 </h1>
							 </div>
						 </div>
                   </div>
              </div>
         </div>
		 <div class="panel" style="background:#f2f2f2">
              <div class="panel-body">
                   <div class="panel-title">
                        <span class="label label-black pull-right" style="background-color:#666;color:#fff">实时</span>
                        <h4>当日订单总数</h4>
                   </div>
                   <div class="panel-content">
						 <div class="row">
							 <div class="col-md-10">
								 <h1 class="syscolor">
									{{pagedata.data.dayorder || '0'}}单
								 </h1>
							 </div>
						 </div>
                   </div>
              </div>
         </div>
         <div class="panel" style="background:#f2f2f2">
              <div class="panel-body">
                   <div class="panel-title">
                        <span class="label label-black pull-right" style="background-color:#666;color:#fff">实时</span>
                        <h4>当日团购套餐金额</h4>
                   </div>
                   <div class="panel-content">
						 <div class="row">
							 <div class="col-md-10">
								 <h1 class="syscolor">
									{{pagedata.data.tcnums || '0.00'}}元
								 </h1>
							 </div>
						 </div>
                   </div>
              </div>
         </div>
         <div class="panel" style="background:#f2f2f2">
              <div class="panel-body">
                   <div class="panel-title">
                        <span class="label label-black pull-right" style="background-color:#666;color:#fff">实时</span>
                        <h4>当日线下收款收入</h4>
                   </div>
                   <div class="panel-content">
						 <div class="row">
							 <div class="col-md-4">
								 <h3 class="syscolor">
									{{pagedata.data.cashoffpay || '0.00'}}元(现金)
								 </h3>
							 </div>
							 <div class="col-md-4">
								 <h3 class="syscolor">
									{{pagedata.data.wxoffpay || '0.00'}}元(微信)
								 </h3>
							 </div>
							 <div class="col-md-4">
								 <h3 class="syscolor">
									{{pagedata.data.zfboffpay || '0.00'}}元(支付宝)
								 </h3>
							 </div>
						 </div>
                   </div>
              </div>
         </div>
		 <div class="panel" style="background:#f2f2f2">
              <div class="panel-body">
                   <div class="panel-title">
                        <span class="label label-black pull-right" style="background-color:#666;color:#fff">实时</span>
                        <h4>当日赠品统计</h4>
                   </div>
                   <div class="panel-content">
						 <div class="row">
							 <div class="col-md-10">
								 <h1 class="syscolor">
									{{pagedata.data.songfee || '0.00'}}元
								 </h1>
							 </div>
						 </div>
                   </div>
              </div>
         </div>
		  <div class="panel" style="background:#f2f2f2">
              <div class="panel-body">
                   <div class="panel-title">
                        <span class="label label-black pull-right" style="background-color:#666;color:#fff">实时</span>
                        <h4>当日实收金额</h4>
                   </div>
                   <div class="panel-content">
						 <div class="row">
							 <div class="col-md-10">
								 <h1 class="syscolor">
									{{pagedata.data.dayfee || '0.00'}}元
								 </h1>
							 </div>
						 </div>
                   </div>
              </div>
         </div>
		 
	</div>
	<div class="col-jy-6" style='border-right: 1px solid #ddd;padding-right:20px'>
    	<div class="panel" style="background:#f2f2f2">
                  <div class="panel-body">
                       <div class="panel-title">
                            <span class="label label-black pull-right" style="background-color:#666;color:#fff">实时</span>
                            <h4>当日线上微信支付收入</h4>
                       </div>
                       <div class="panel-content">
    						 <div class="row">
    							 <div class="col-md-10">
    								 <h1 class="syscolor">
    									{{pagedata.data.wechat || '0.00'}}元
    								 </h1>
    							 </div>
    						 </div>
                       </div>
                  </div>
             </div>
    		 <div class="panel" style="background:#f2f2f2">
                  <div class="panel-body">
                       <div class="panel-title">
                            <span class="label label-black pull-right" style="background-color:#666;color:#fff">实时</span>
                            <h4>当日线上余额支付收入</h4>
                       </div>
                       <div class="panel-content">
    						 <div class="row">
    							 <div class="col-md-10">
    								 <h1 class="syscolor">
    									{{pagedata.data.credit || '0.00'}}元
    								 </h1>
    							 </div>
    						 </div>
                       </div>
                  </div>
             </div>
    		 <div class="panel" style="background:#f2f2f2">
                  <div class="panel-body">
                       <div class="panel-title">
                            <span class="label label-black pull-right" style="background-color:#666;color:#fff">实时</span>
                            <h4>当日抹零统计</h4>
                       </div>
                       <div class="panel-content">
    						 <div class="row">
    							 <div class="col-md-10">
    								 <h1 class="syscolor">
    									{{pagedata.data.molin || '0.00'}}元
    								 </h1>
    							 </div>
    						 </div>
                       </div>
                  </div>
             </div>
             <div class="panel" style="background:#f2f2f2">
                  <div class="panel-body">
                       <div class="panel-title">
                            <span class="label label-black pull-right" style="background-color:#666;color:#fff">实时</span>
                            <h4>当日退品统计</h4>
                       </div>
                       <div class="panel-content">
    						 <div class="row">
    							 <div class="col-md-10">
    								 <h1 class="syscolor">
    									{{pagedata.data.tuping || '0.00'}}元
    								 </h1>
    							 </div>
    						 </div>
                       </div>
                  </div>
             </div>
    		  <div class="panel" style="background:#f2f2f2">
                  <div class="panel-body">
                       <div class="panel-title">
                            <span class="label label-black pull-right" style="background-color:#666;color:#fff">实时</span>
                            <h4>当日劵抵扣统计</h4>
                       </div>
                       <div class="panel-content">
    						 <div class="row">
    							 <div class="col-md-10">
    								 <h1 class="syscolor">
    									{{pagedata.data.couponnums || '0.00'}}元
    								 </h1>
    							 </div>
    						 </div>
                       </div>
                  </div>
             </div>
    		 
    	</div>
	</div>
</div>
<script language='javascript'>
setTimeout(function(){
 var res = scope.pagedata.data01;
	if(res){
		   $("#echarts-loading-01").hide()
		   $("#echarts-chart-01").show();
			pie_chart_01(res);
	   }
} ,300);
function pie_chart_01(res){
	require(['echarts'],function (echarts) {
	var myChart = echarts.init(document.getElementById("echarts-chart-01"));
	var legend=[];
	$.each(res.datas,function(k,v){
		legend.push(v.name);
	});
	var series=[];
	$.each(res.datas,function(k,v){
		series.push({
				name: v.name,
				type: "line",
				data: v.value,
				smooth:true,
				symbolSize:2,
				itemStyle: {normal: {areaStyle: {type: 'default'}}},
		});
	});
	var option = {
			title : {
				text: scope.check_show_lang('7日销量走势图'),
			},
			tooltip : {
				trigger: 'axis',
				position: function (point) {
                            return [point[0], '10%'];
                        },
                        axisPointer: {
                            type: 'line'
                        }
			},
			legend: {
				data:legend
			},
			toolbox: {
				show : true,
				feature : {
					mark : {show: true},
					dataView : {show: true, readOnly: false},
					magicType : {show: true, type: ['line', 'bar', 'stack', 'tiled']},
					restore : {show: true},
					saveAsImage : {show: true}
				}
			},
			calculable : true,
			xAxis : [
				{
					type : 'category',
					boundaryGap : false,
					data : res.xdatas
				}
			],
			yAxis : [
				{
					type : 'value'
				}
			],
			series : series,
		};
		myChart.setOption(option);
		window.onresize = myChart.resize;
	});
}
</script>
<script language='javascript'>
setTimeout(function(){
 var res = scope.pagedata.data02;
	if(res){
		   $("#echarts-loading-02").hide()
		   $("#echarts-chart-02").show();
			pie_chart_02(res);
	   }
} ,300);
function pie_chart_02(res){
	require(['echarts'],function (echarts) {
	var myChart = echarts.init(document.getElementById("echarts-chart-02"));
	option = {
	  title: {
		 text: scope.check_show_lang('本月运营数据')
	  },
	  xAxis: {
		max: 'dataMax'
	  },
	  yAxis: {
		type: 'category',
		inverse: true,
		data: res.names
	  },
	  series: [
		{
		  data: res.values,
		  type: 'bar',
		  itemStyle: {normal: {label: {show:true,position: 'right'}}},
		}
	  ]
	};
		myChart.setOption(option);
		window.onresize = myChart.resize;
	});
}
</script>
<script language='javascript'>
setTimeout(function(){
 var res = scope.pagedata.data03;
	if(res){
		   $("#echarts-loading-03").hide()
		   $("#echarts-chart-03").show();
			pie_chart_03(res);
			
	   }
} ,300);
function pie_chart_03(res){
	require(['echarts'],function (echarts) {
    	var myChart = echarts.init(document.getElementById("echarts-chart-03"));
    	option = {
    	  title: {
    		 text: scope.check_show_lang('本月商品TOP2')
    	  },
    	  xAxis: {
    		type: 'category',
    		data: res.names
    	  },
    	  yAxis: {
    		type: 'value'
    	  },
    	  series: [
    		{
    		  data: res.values,
    		  type: 'bar'
    		}
    	  ]
    	};

		myChart.setOption(option);
		window.onresize = myChart.resize;
	});
}
</script>
<script language='javascript'>
setTimeout(function(){
 var res = scope.pagedata.data04;
	if(res){
		   $("#echarts-loading-04").hide()
		   $("#echarts-chart-04").show();
			pie_chart_04(res);
	   }
} ,300);
function pie_chart_04(res){
	require(['echarts'],function (echarts) {
	var myChart = echarts.init(document.getElementById("echarts-chart-04"));
	option = {
	  title: {
		 text: scope.check_show_lang('本月各等级成交客户数/订单数')
	  },
	  legend: {
          show: true,
          right: '5%',
       },
	  xAxis: {
		max: 'dataMax'
	  },
	  yAxis: {
		type: 'category',
		inverse: true,
		data: res.names
	  },
	  series: [
		{
		  name: '订单数',
		  data: res.values1,
		  type: 'bar',
		  itemStyle: {normal: {label: {show:true,position: 'right'}}},
		},
		{
		  name: '成交客户数',
		  data: res.values2,
		  type: 'bar',
		  itemStyle: {normal: {label: {show:true,position: 'right'}}},
		}
	  ]
	};
		myChart.setOption(option);
		window.onresize = myChart.resize;
	});
}
</script>